Skip to content

fix(ios): keep the native instance on the MenuView ref - #1270

Merged
Naturalclar merged 1 commit into
masterfrom
fix/ios-native-ref
Nov 29, 2026
Merged

Naturalclar merged 1 commit into
masterfrom
fix/ios-native-ref

Conversation

@Naturalclar

Copy link
Copy Markdown
Member

Problem

#1265 gave iOS a show() that doesn't throw, but replaced the ref's native instance with a plain { show } object. Calls on the ref that worked up to 2.3.3 throw in 2.3.4 and 2.3.5.

Change

Attach show() to the native instance and expose that instance as the ref again. show() still does nothing on iOS and warns in development.

Verification

Run on an iOS 18.5 simulator (RN 0.81, New Architecture):

Call on ref.current 2.3.3 2.3.5 This PR
show() throws ok ok
findNodeHandle(ref.current) ok throws ok
measure() ok throws ok
measureInWindow() ok throws ok
measureLayout() ok throws ok
setNativeProps() ok throws ok

The ref is the same object after a re-render, null after unmount, and has show() again after a remount. Callback refs fire once per mount and unmount.

Not run on the old architecture.

🤖 Generated with Claude Code

#1265 made the iOS ref `{ show }` only, so measure(), measureInWindow(),
measureLayout(), setNativeProps() and findNodeHandle() on it, which worked
up to 2.3.3, throw since 2.3.4. Attach show() to the native instance and
expose that instance again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Naturalclar
Naturalclar merged commit 8907d89 into master Nov 29, 2026
6 checks passed
@Naturalclar
Naturalclar deleted the fix/ios-native-ref branch November 29, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant